/** \file Options_t.cc 
 * Test definitions for the Options class template.
 *
 * (c) Copyright  Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id$
 *
 *
 */

#include "Options_t.hh"
#include <QtTest/QtTest>
#include "Options.hh"

using namespace std;
using namespace TC;

TC_IDENT("$Id$");


void Options_t::tests()
{
  Options opts;
  opts += Option().name("first").letter('f').desc("First");
  opts += Option().name("second").letter('s').desc("Second");
  opts += Option().name("third").letter('t').desc("third");

  QStringList args;
  args << "--first=1"
       << "--second=2"
       << "-t" << "3"
      ;

  opts.setArgs(args);
  QVERIFY(opts.parse());

  Options::OptionVals_t& optvals = opts.getOptionVals();
  qDebug() << optvals.size();
  QVERIFY(optvals.size() == 3);
  
}

  



